﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using Clarendon.AzureBilling.Library;

namespace Clarendon.AzureBilling.Library
{
    /// <summary>
    /// Interface used to register interest for client callbacks to the WCF-hosted service
    /// </summary>
    [ServiceContract(Namespace = "http://www.clarendonint.com/schemas/azurebilling", 
        CallbackContract = typeof(IBillingContractCallback),
        SessionMode = SessionMode.Required)]
    public interface IBillingContract
    {
        /// <summary>
        /// Set a subscribe beaviour for the billing contract to regulate a client callback
        /// </summary>
        [OperationContract]
        void ObserveServiceBillingContract();

        /// <summary>
        /// Set an unsubscribe behaviour for the billing contract no client callbacks after this
        /// </summary>
        [OperationContract]
        void UnobserveServiceBillingContract();

        /// <summary>
        /// Makes an ad-hoc request to the windows service to have the hosted service set returned
        /// </summary>
        [OperationContract]
        List<HostedService> MakeAdHocServiceRequest();
    }

   
}
